function GSMainMenu () {
	var BUTTON_SXU = 0;
	var BUTTON_SYU = 0;
	var BUTTON_SXD = 0;
	var BUTTON_SYD = 100;
	var BUTTON_SW = 200;
	var BUTTON_SH = 100;
	
	var BUTTON_FONT = "Verdana";
	var BUTTON_FONT_SIZE = 35;
	var BUTTON_FONT_COLOR_R = 64;
	var BUTTON_FONT_COLOR_G = 128;
	var BUTTON_FONT_COLOR_B = 192;
	var BUTTON_FONT_SIZE_CLICK = 33;
	var BUTTON_FONT_COLOR_R_CLICK = 150;
	var BUTTON_FONT_COLOR_G_CLICK = 200;
	var BUTTON_FONT_COLOR_B_CLICK = 255;
	var BUTTON_FONT_OFFSET_X = 0;
	var BUTTON_FONT_OFFSET_Y = -10;
	
	var PLAY_BUTTON_DX = 540;
	var PLAY_BUTTON_DY = 400;
	var PLAY_BUTTON_DW = 200;
	var PLAY_BUTTON_DH = 100;
	
	var OPTION_BUTTON_DX = 540;
	var OPTION_BUTTON_DY = 500;
	var OPTION_BUTTON_DW = 200;
	var OPTION_BUTTON_DH = 100;
	
	var QUIT_BUTTON_DX = 540;
	var QUIT_BUTTON_DY = 600;
	var QUIT_BUTTON_DW = 200;
	var QUIT_BUTTON_DH = 100;
	
	

	// Background image
	var splashImageHandle;
	
	// Button
	var playButton;
	var optionButton;
	var quitButton;
	
	this.Init = function () {
		splashImageHandle = g_graphicEngine.LoadImage("Data/MainMenu/MainBG.jpg");
		
		playButton = new Button();
		playButton.LoadImage("Data/MainMenu/Button.png", BUTTON_SXU, BUTTON_SYU, BUTTON_SXD, BUTTON_SYD, BUTTON_SW, BUTTON_SH);
		playButton.SetPosition (PLAY_BUTTON_DX, PLAY_BUTTON_DY, PLAY_BUTTON_DW, PLAY_BUTTON_DH);
		playButton.SetCaption (TEXT_PLAY, BUTTON_FONT_OFFSET_X, BUTTON_FONT_OFFSET_Y, BUTTON_FONT, 
			BUTTON_FONT_SIZE, BUTTON_FONT_COLOR_R, BUTTON_FONT_COLOR_G, BUTTON_FONT_COLOR_B, 
			BUTTON_FONT_SIZE_CLICK, BUTTON_FONT_COLOR_R_CLICK, BUTTON_FONT_COLOR_G_CLICK, BUTTON_FONT_COLOR_B_CLICK);
		playButton.RegisterFunction(GoToChapterSelect);
		
		optionButton = new Button();
		optionButton.LoadImage("Data/MainMenu/Button.png", BUTTON_SXU, BUTTON_SYU, BUTTON_SXD, BUTTON_SYD, BUTTON_SW, BUTTON_SH);
		optionButton.SetPosition (OPTION_BUTTON_DX, OPTION_BUTTON_DY, OPTION_BUTTON_DW, OPTION_BUTTON_DH);
		optionButton.SetCaption (TEXT_OPTION, BUTTON_FONT_OFFSET_X, BUTTON_FONT_OFFSET_Y, BUTTON_FONT, 
			BUTTON_FONT_SIZE, BUTTON_FONT_COLOR_R, BUTTON_FONT_COLOR_G, BUTTON_FONT_COLOR_B,
			BUTTON_FONT_SIZE_CLICK, BUTTON_FONT_COLOR_R_CLICK, BUTTON_FONT_COLOR_G_CLICK, BUTTON_FONT_COLOR_B_CLICK);
		optionButton.RegisterFunction(GoToOption);
		
		quitButton = new Button();
		quitButton.LoadImage("Data/MainMenu/Button.png", BUTTON_SXU, BUTTON_SYU, BUTTON_SXD, BUTTON_SYD, BUTTON_SW, BUTTON_SH);
		quitButton.SetPosition (QUIT_BUTTON_DX, QUIT_BUTTON_DY, QUIT_BUTTON_DW, QUIT_BUTTON_DH);
		quitButton.SetCaption (TEXT_QUIT, BUTTON_FONT_OFFSET_X, BUTTON_FONT_OFFSET_Y, BUTTON_FONT, 
			BUTTON_FONT_SIZE, BUTTON_FONT_COLOR_R, BUTTON_FONT_COLOR_G, BUTTON_FONT_COLOR_B,
			BUTTON_FONT_SIZE_CLICK, BUTTON_FONT_COLOR_R_CLICK, BUTTON_FONT_COLOR_G_CLICK, BUTTON_FONT_COLOR_B_CLICK);
		quitButton.RegisterFunction(Quit);
	}
	
	this.Update = function () {
	
	}
	
	this.Draw = function () {
		g_graphicEngine.DrawFast (g_context, splashImageHandle, 0, 0);
		
		playButton.Draw();
		optionButton.Draw();
		quitButton.Draw();
	}
	
	
	this.OnSwitch = function () {
		
	}
	
	this.OnMouseMove = function (x, y) {
		playButton.OnMouseMove (x, y);
		optionButton.OnMouseMove (x, y);
		quitButton.OnMouseMove (x, y);
	}
	
	this.OnMouseDown = function (x, y) {
		playButton.OnMouseDown (x, y);
		optionButton.OnMouseDown (x, y);
		quitButton.OnMouseDown (x, y);
	}
	
	this.OnMouseUp = function (x, y) {
		playButton.OnMouseUp (x, y);
		optionButton.OnMouseUp (x, y);
		quitButton.OnMouseUp (x, y);
	}
	
	this.OnMouseWheel = function (delta) {
	
	}
	
	this.OnKeyDown = function (keycode) {
	
	}
	
	this.OnKeyUp = function (keycode) {
	
	}
	
	
	function GoToChapterSelect() {
		SwitchState (g_gsChapter, true);
	}
	
	function GoToOption() {
		g_gsOption.InvokeFromMainMenu();
		SwitchState (g_gsOption, true);
	}
	
	function Quit() {
	
	}
}